﻿//////////////////////////////////////////////////////////////////////////////
//
//  Copyright © 1998-2024 Glodon Company Limited.  All rights reserved.
//
//  Use of this software is subject to the terms of the Glodon license
//  agreement provided at the time of installation or download, or which
//  otherwise accompanies this software in either electronic or hard copy form.  
//
//////////////////////////////////////////////////////////////////////////////

// Reviewed

#pragma once
#include "GcmpRenderingInterface.h"
#include "NdbDataSchema.h"

namespace gcmp
{
    /// \brief ViewShip尺寸
    SERIALIZABLE_ENUM_CLASS(ViewShipSize)
    {
        Tiny = 0,         ///< 很小
        Small,            ///< 较小
        Normal,           ///< 普通大小
        Big,              ///< 较大
        Large,            ///< 很大
        Minimum           ///< 非常小
    };
    /// \brief 水平对齐模式
    SERIALIZABLE_ENUM_CLASS(HorizontalAlignment)
    {
        None,              ///< 不对齐 
        Left,              ///< 居左 
        Center,            ///< 居中
        Right              ///< 居右
    };
    /// \brief 垂直对齐模式
    SERIALIZABLE_ENUM_CLASS(VerticalAlignment)
    {
        None,             ///< 不对齐 
        Top,              ///< 居上
        Center,           ///< 居中
        Bottom            ///< 居下
    };

    /// \brief ViewShip选项设置
    class GCMP_RENDERING_INTERFACE_EXPORT IViewShipOptions
    {
    public:
        /// \brief 析构函数 
        ///
        /// \return 无
        virtual ~IViewShipOptions();

        /// \brief 设置ViewShip的透明度
        ///
        /// \param[in] alpha 1为不透明,0为全透明
        /// \return void
        virtual void SetViewShipAlpha(double alpha) = 0;

        /// \brief 获取ViewShip的透明度
        ///
        /// \return 透明度
        virtual double GetViewShipAlpha() const = 0;

        /// \brief 调整ViewShip的尺寸
        ///
        /// \param[in] size 枚举尺寸
        /// \return void
        virtual void SetViewShipSize(ViewShipSize size) = 0;

        /// \brief 获取ViewShip的尺寸
        ///
        /// \return ViewShip尺寸
        virtual ViewShipSize GetViewShipSize() const = 0;

        /// \brief 调整ViewShip的位置
        ///
        /// \param[in] horizontalAlignment 水平对齐
        /// \param[in] verticalAlignment 竖直对齐
        /// \return void
        virtual void SetViewShipAlignment(HorizontalAlignment horizontalAlignment, VerticalAlignment verticalAlignment) = 0;

        /// \brief 获取ViewShip的水平位置
        ///
        /// \return ViewShip的水平位置
        virtual HorizontalAlignment GetViewShipHorizontalAlignment() const = 0;

        /// \brief 获取ViewShip的垂直位置
        ///
        /// \return ViewShip的垂直位置
        virtual VerticalAlignment GetViewShipVerticalAlignment() const = 0;

        /// \brief 显示ViewShip
        ///
        /// \return void
        virtual void ShowViewShip() = 0;

        /// \brief 隐藏ViewShip
        ///
        /// \return void
        virtual void HideViewShip() = 0;

        /// \brief ViewShip是否显示
        ///
        /// \return 是否显示
        virtual bool IsViewShipVisible() const = 0;

        /// \brief 设置ViewShip控制圆环的拾取范围精度，单位为像素
        ///
        /// \param[in] tolerance 拾取范围精度，单位为像素，要求tolerance值大于3,小于30
        /// \return 是否设置成功，超出tolerance的要求范围会返回false，在范围内返回true
        virtual bool SetViewShipControlRingPickTolerance(int tolerance) = 0;

        /// \brief 获取ViewShip控制圆环的拾取范围精度，单位为像素
        ///
        /// \return 当前的拾取范围精度，单位为像素
        virtual int GetViewShipControlRingPickTolerance() const = 0;

    };
}

